package Core;

public class ClassLevelRequirementImpl implements ClassRequirement
{
	private CharacterClass _characterClass;
	private int _minLevel;
	
	public ClassLevelRequirementImpl(CharacterClass characterClass, int minLevel)
	{
		this._characterClass = characterClass;
		this._minLevel = minLevel;
	}
	
	@Override
	public boolean isSatisfiedBy(Character character)
	{
		boolean isSatisfied = false;
		
		int currentLevelInClass = character.getLevelsIn(this._characterClass);
		
		isSatisfied = this._minLevel <= currentLevelInClass;
		
		return isSatisfied;
	}

}
